#include <stdlib.h>
#include <stdio.h>
#include <SDL/SDL.h>


/* \brief obsolete
 *
 * \return int
 *
 */
int sldShowGrid()
{
    SDL_Surface* screen = NULL;
    SDL_Event event;
    int continuer;

    if (SDL_Init(SDL_INIT_VIDEO) == -1)
    {
        fprintf(stderr, "Erreur d'initialisation de la SDL : %s\n", SDL_GetError());
        exit(EXIT_FAILURE);
    }
    screen = SDL_SetVideoMode(800, 600, 32, SDL_HWSURFACE | SDL_DOUBLEBUF);
    if (screen == NULL) //SetVideoMode renvoie NULL si l'allocation a echouee
    {
        fprintf(stderr, "Erreur d'initialisation de la video... %s\n", SDL_GetError());
        exit(EXIT_FAILURE); //Quitte le programme
    }

    SDL_WM_SetCaption("Space-Pogo", NULL); // titre la fenetre

    while (continuer)
    {
        SDL_WaitEvent(&event);
        switch(event.type)
        {
            case SDL_QUIT:
                continuer = 0;
        }

        SDL_Flip(screen);
    }

    SDL_Quit();

    return EXIT_SUCCESS;
}
